import request from './axios.js'
export const getBanner = () => request('/banner') //首页banner
export const getPersonalized = () => request('/personalized',{limit:8})//首页热门推荐
export const getTopAlbum = () => request('/top/album',{limit:10})//首页新碟上架
export const getToplist = () => request('/toplist',{limit:10})//首页新碟上架
export const getToplistDetail = (data) => request('/playlist/detail',data)//首页新碟上架
export const getPopSinger = () => request('/top/artists',{limit:5})//首页热门歌手
export const getDjPopular = () => request('/dj/toplist/popular',{limit:5})//首页热门电台
/** 歌曲详情页接口 */
export const getSongDetail = (data) => request('/song/detail',data)//获取歌曲详情
export const getLyric = (data) => request('/lyric',data)//获取歌曲歌词
export const getSimiPlaylist = (data) => request('/simi/playlist',data)//获取相似歌单

// 获取登录二维码
export const getCodeImg = () => {
  return request('/login/qr/key').then(({data})=>{
    return request('/login/qr/create',{key:data.data.unikey,qrimg:0})
  })//获取相似歌单
}
export const getLoginQrKey = () => request('/login/qr/key')//
export const getLoginQrCreate = (data) => request('/login/qr/create', data)//
export const getLoginQrCheck = (data) => request('/login/qr/check', data)//

//排行榜页面
export const getRankList = () => request('/toplist/detail')
export const getRankListDetail = (data) => request('/playlist/detail', data)



//评论接口
export const getCommentList = (data) =>{
  return request('/comment/new', data)
}

// 歌单页面
export const getPlayList = () =>{
  return request('/playlist/catlist')
}
export const getPlayListList = (data) =>{
  return request('/top/playlist', data)
}
// 主播电台
export const getDjCatelist = () =>{
  return request('/dj/catelist')
}
